<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>详细信息</title>
<script type="text/javascript">  
    function docommit() {  
        var f1 = document.getElementById("form1"); 
        
        if (f1.sex.value=="") {  
            alert("请选择性别!");  
            f1.sex.focus();  
            return;  
        }  
        
        if (f1.age.value>100||f1.age.value<=0) {  
            alert("请正确输入年龄!");  
            f1.age.focus();  
            return;  
        }  
        
        if (f1.phone.value == undefined || f1.phone.value.length != 11) {  
            alert("请正确输入11位手机号码!");  
            f1.phone.focus();  
            return;  
        } 
        
        if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(f1.mail.value)) {  
            alert("请正确输入邮箱地址!");  
            f1.mail.focus();  
            return;  
        }  
        
        f1.action="<%=path%>/RegisterInsertAction";
        f1.submit();
	}
</script>
</head>
<body>
	<form id="form1" method="post">
		<input type="hidden" name="id" value="${id}">
		性别:<input type="radio" name="sex" value="male">男<input
			type="radio" name="sex" value="female">女<br /> 年龄:<input
			type="text" name="age"><br /> 手机:<input type="text"
			name="phone"><br /> 邮箱:<input type="text" name="mail"><br />
		<input type="button" name="commit" value="提交" onclick="javascript:docommit()"> <input
			type="button" name="cancle" value="取消" onclick="<%=path%>/information.jsp">
	</form>
</body>
</html>